<template>
	<form action="#" class="m-input f-bd f-bd-btm" method="get">
		<div class="inputcover">
			<i class="u-svg u-svg-srch"></i>
			<input type="search" name="search" class="input" placeholder="" autocomplete="off" v-model="skeyword" @click="ishow">
			<label class="holder" ref="nshow">搜索歌曲、歌手、专辑</label>
			<figure class="close">
				<i class="u-svg u-svg-empty"></i>
			</figure>
		</div>
	</form>
</template>

<script>
	export default {
		computed:{
			skeyword:{
				get(){
					return this.$store.state.skeyword;
				},
				set(value){
					this.$store.dispatch("updateSkd",value);
				}
			}
		},
		methods:{
			ishow(){
				this.$refs.nshow.style.display="none"
			}
		}
	}
</script>

<style>
	.m-input .u-svg-empty {
		display: none;
		vertical-align: middle;
	}

	.u-svg-empty {
		width: 14px;
		height: 14px;
		background-image: url()
	}

	.tabctitem {
		width: 100%;
		height: 100%;
	}

	.m-hmsrch {
		background: #fbfcfd;
	}

	.m-input {
		padding: 15px 10px;
	}

	.f-bd {
		position: relative;
	}

	.m-input .inputcover {
		position: relative;
		width: 100%;
		height: 30px;
		padding: 0 30px;
		box-sizing: border-box;
		background: #ebecec;
		border-radius: 30px;
	}

	.m-input:after {
		border-color: rgba(0, 0, 0, .1);
	}


	.m-input {
		border-bottom: 1px solid #ccc;
		border-top: 1px solid #ccc;
	}

	/* .f-bd-btm::after {
		border-bottom-width: 1px;
	}

	.f-bd::after {
		position: absolute;
		z-index: 2;
		content: "";
		top: 0;
		left: 0;
		pointer-events: none;
		box-sizing: border-box;
		transform-origin: top left;
		border: 0 solid rgba(0, 0, 0, .1);
	} */

	.u-svg-srch {
		position: absolute;
		left: 0;
		top: 9px;
		margin: 0 8px;
		vertical-align: middle;
		width: 13px;
		height: 13px;
		background-image: url();
	}

	.u-svg {
		display: inline-block;
		vertical-align: middle;
		background-position: 0 0;
		background-size: contain;
		background-repeat: no-repeat;
	}

	.m-input .input {
		width: 100%;
		height: 30px;
		line-height: 18px;
		background: rgba(0, 0, 0, 0);
		font-size: 14px;
		color: #333;
		outline: none;
	}
	
	.inputcover input {
		border: none;
		border-radius: 0;
	}
	
	.m-input .holder {
		position: absolute;
		left: 30px;
		top: 5px;
		font-size: 14px;
		color: #c9c9c9;
		background: rgba(0, 0, 0, 0);
		pointer-events: none;
	}
	
	.m-input .close {
		position: absolute;
		right: 0;
		top: 0;
		width: 30px;
		height: 30px;
		line-height: 28px;
		text-align: center;
	}
</style>
